﻿<%@ Page Language="C#" MasterPageFile="~/Hoso/MasterPage_Hoso.master" AutoEventWireup="true" CodeFile="QuantriLoaiCLS.aspx.cs" Inherits="Hoso_QuantriLoaiCLS" %>

<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<%@ Register TagPrefix="uc" TagName="Menu" Src="~/Hoso/QuantriMenu.ascx"%>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <uc:Menu id="menu" runat="server"/>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
    <asp:Label ID="Label1" runat="server" EnableViewState="False" Font-Bold="True" ForeColor="#FF8080"></asp:Label>
        <asp:Label ID="Label2" runat="server" EnableViewState="False" Font-Bold="True" ForeColor="#00C000"></asp:Label>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" 
        DataSourceID="SqlDataSource1" GridLines="None" 
        AllowAutomaticDeletes="True" OnItemDeleted="vd_dele" 
        AllowAutomaticInserts="True" OnItemInserted="vd_insert"
        AllowAutomaticUpdates="True" OnItemUpdated="vd_update" 
        AllowPaging="True" AllowFilteringByColumn="True" AllowSorting="True" 
        Skin="Office2007">
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>

<MasterTableView autogeneratecolumns="False" datakeynames="maloai" 
            datasourceid="SqlDataSource1" CommandItemDisplay="Top">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>

    <Columns>
      <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                        <ItemStyle CssClass="MyImageButton" />
                    </telerik:GridEditCommandColumn>
        <telerik:GridBoundColumn DataField="maloai" DataType="System.Int32" 
            FilterControlAltText="Filter maloai column" HeaderText="maloai" 
            ReadOnly="True" SortExpression="maloai" UniqueName="maloai">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="tenloai" 
            FilterControlAltText="Filter tenloai column" HeaderText="tenloai" 
            SortExpression="tenloai" UniqueName="tenloai">
        </telerik:GridBoundColumn>
         <telerik:GridButtonColumn ConfirmText="Xóa loại cận lâm sàng này?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                        UniqueName="DeleteColumn" >
                        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                    </telerik:GridButtonColumn>
    </Columns>

<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>

<FilterMenu EnableImageSprites="False"></FilterMenu>
    </telerik:RadGrid>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:forumConnectionString %>" 
        SelectCommand="SELECT * FROM [LOAICLS]"
        OldValuesParameterFormatString="original_{0}" 
        ConflictDetection="CompareAllValues" 
        DeleteCommand="DELETE FROM [LOAICLS] WHERE [maloai] = @original_maloai AND [tenloai] = @original_tenloai" 
        InsertCommand="INSERT INTO [LOAICLS] ([tenloai]) VALUES (@tenloai)" 
        UpdateCommand="UPDATE [LOAICLS] SET [tenloai] = @tenloai WHERE [maloai] = @original_maloai AND [tenloai] = @original_tenloai">
        <DeleteParameters>
            <asp:Parameter Name="original_maloai" Type="Int32" />
            <asp:Parameter Name="original_tenloai" Type="String" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="tenloai" Type="String" />
            <asp:Parameter Name="original_maloai" Type="Int32" />
            <asp:Parameter Name="original_tenloai" Type="String" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="tenloai" Type="String" />
        </InsertParameters>
        
        
        </asp:SqlDataSource>
</asp:Content>